package com.pricl.biz;

/**
 * 权限类型枚举类
 * 
 * @author Fu
 *
 */
public enum AuthUserType {

	// TODO
	ADMIN(99, "admin", ""), MANAGER(9, "manager", ""), T1(1, "", ""), T2(2, "", ""), T3(3, "", ""), T4(4, "", ""), T5(5,
			"", ""), T6(6, "", "");

	// 代码
	public Integer code;
	// 角色
	public String role;
	// 描述
	public String des;

	private AuthUserType(Integer code, String role, String des) {
		this.code = code;
		this.role = role;
		this.des = des;
	}

	public static AuthUserType getType(Integer code) {
		AuthUserType[] types = values();
		for (AuthUserType type : types) {
			if (code.equals(type.code))
				return type;
		}
		return null;
	}

}
